The present invention relates to a content-based image retrieval method and apparatus for designating an image or figure and retrieving image data similar to the designated image or figure in, e.g., an image database or an image file system.
As an image retrieval method for searching a plurality of images stored in an image file format to find a desired image, the following methods are conventionally used.
(1) In a so-called template matching method, when a designated image as a search template or search key is input, the designated image is sequentially superposed on image data stored in an image file to be searched, a sum total of differences between the pixels of the designated image and those of each image data in the image file is calculated, and the minimum value of the sum totals is determined as a difference between the designated image and the image data in the image file, thereby selecting image data having a difference equal to or smaller than a predetermined value as similar images.
(2) In another method, image data stored in an image file are segmented into some regions having similar pixel values, the correspondences between data that describe the image regions and a designated image or figure are calculated using characteristics such as an area, secondary moment, or the like, and image data having the largest similarly is selected as a similar image.
However, in the conventional method (1), the designated image must be moved with respect to image data to be searched, and a difference in the number of corresponding pixels must be calculated in each movement. For this reason, the search processing requires much time. Upon search, since an accurate search result cannot be obtained unless the designated image is compared while being moved in units of sufficiently small distances in a two-dimensional region of image data, a very long calculation time is required.
In the conventional method (2), a normal search operation is disturbed when one region of image data in the image file to be searched does not have a one-to-one correspondence with one region of an image designated as a search key, i.e., when an image in the image file is over-segmented into smaller regions than the corresponding regions in a designated image.
In a so-called segmentation technique for automatically segmenting image data into a plurality of regions, since a target area which is perceived by a person as one region is often divisionally extracted as a plurality of portions, such a limitation poses a serious problem in an application.
When an image retrieval operation is performed, calculations for checking matching between a designated image or figure to be retrieved (to be referred to as a designated image hereinafter) and each region of all images stored in the image file system are required. When there are a large number of stored images, the calculation amount becomes huge, and the time required for image retrieval also becomes very long. In order to solve this problem, a method for decreasing the number of images to be subjected to matching calculations by limiting the stored images using the color information of the stored images and the designated image to attain high-speed search processing has already been proposed.
However, in the above-mentioned search method, for example, when a stored image includes a large number of fine regions having various colors, a color similar to the color of a closed figure designated by the designated image is included in the stored image with high possibility independently of an image designated as the designated image. As a result, even when an image including such a region is not actually data to be searched, it is undesirably selected as data for which distance calculations are to be performed, and he effect of the limitation processing cannot be expected.